<div style="width: 100%">
    <div class="panel-heading">
        <span class="panel-title">token管理</span>
        <span class="panel-controls">
            <a href="javascript:void(0)" ng-click="token.cancel()"><i class="fa fa-close"></i></a>
        </span>
    </div>
    <div class="panel-body" style="padding: 10px;">
        <div class="panel-tabs">
            <table class="table table-hover text-center table-condensed">
                    <thead>
                        <tr>
                            <th style="text-align: center;">token</th>
                            <th style="text-align: center;">创建用户</th>
                            <th style="text-align: center;">创建时间</th>
                            <th style="text-align: center;">描述</th>
                            <th style="text-align: center;">成功后调用作业</th>
                            <th style="text-align: center;">操作</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr ng-repeat="t in token.allToken ">
                            <td>{{t.token}}</td>
                            <td>{{t.create_user}}</td>
                            <td>{{t.create_time}}</td>
                            <td>{{t.describe}}</td>
                            <td>{{token.showJob(t.isjob, t.jobname)}}</td>
                            <td>
                                <button class="btn btn-danger btn-sm" ng-click="token.delToken(t.id)">删除</button>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>

        <div class="panel-heading">
            <span class="panel-title">token添加：</span>
            <span class="panel-controls">
            </span>
        </div>

        <div style="margin: 1%" class="row">
            <div class="col-md-4" style="padding: 0 5px">
                <div class="input-group fluid-width">
                    <input type="text" class="form-control" ng-model="token.newToken" style="padding-top: 4px;padding-bottom: 4px;height: 30px" placeholder="token">
                </div>
            </div>
            <div class="col-md-6" style="padding: 0 5px">
                <div class="input-group fluid-width">
                    <input type="text" class="form-control" ng-model="token.tokenDis" style="padding-top: 4px;padding-bottom: 4px;height: 30px" placeholder="描述">
                </div>
            </div>
            <button class="btn btn-primary btn-sm" ng-click="token.addToken()">添加token</button>
        </div>
        <div class="row" style="margin: 1%">
            <div class="form-group col-sm-2" style="padding:0 5px">
                <label class="control-label fwbold" >上传文件后调用job:</label>
            </div>
            <div class="form-group admin-form col-sm-2" style="padding: 0 5px">
                <label class="switch switch-system mt5">
                    <input type="checkbox" id="check_job" ng-model="token.isjob">
                    <label for="check_job" data-on="ON" data-off="OFF"></label>
                </label>
            </div>
            <div class="form-group col-sm-2" style="padding: 0 5px">
                <label ng-if="token.isjob" class="control-label fwbold" style="padding-right: 2%;">常用作业:</label>
            </div>
            <div class="form-group col-sm-4" style="padding: 0 5px">
                <select ng-if="token.isjob" class="form-control" ng-model="token.jobname" ng-options="jobname for jobname in token.allJobs"></select> 
            </div>
        </div>

        <div style="margin: 2%">
            <span><span style="color: red;font-weight: bold">添加token命令:</span> curl -X POST http://<span>{{token.hosturl}}</span>/api/job/fileserver/<span>{{token.treeid}}</span>/upload -F "filename=@/tmp/xxx.txt" -H 'token: <span>{{token.newToken}}</span>'</span>
        </div>
        <div class="row">
            <div class="col-sm-3 form-group" style="margin-left: 40%;">
                <button class="btn btn-warning btn-sm" ng-click="token.cancel()">取消</button>
            </div>
        </div>
    </div>
